<%@ page import="com.nananer7.dao.IdeaDao" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: nananer7
  Date: 2018/3/23
  Time: 14:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="lt-ie9" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-US"> <!--<![endif]-->
<head>
    <!-- META TAGS -->
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>BrainStorming</title>

    <link rel="shortcut icon" href="images/favicon.png" />




    <!-- Style Sheet-->
    <link rel="stylesheet" href="style.css"/>
    <link rel='stylesheet' id='bootstrap-css-css'  href='css/bootstrap5152.css?ver=1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='responsive-css-css'  href='css/responsive5152.css?ver=1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='pretty-photo-css-css'  href='js/prettyphoto/prettyPhotoaeb9.css?ver=3.1.4' type='text/css' media='all' />
    <link rel='stylesheet' id='main-css-css'  href='css/main5152.css?ver=1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='custom-css-css'  href='css/custom5152.html?ver=1.0' type='text/css' media='all' />


    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="js/html5.js"></script></script>
    <![endif]-->

</head>

<body>

<%
    String username=(String)session.getAttribute("username");
  /*  if(username==null){
        out.print("<script>window.location='login.jsp'</script>");
    }*/
%>

<!-- Start of Header -->
<div class="header-wrapper">
    <header>
        <div class="container">


            <div class="logo-container">
                <!-- Website Logo -->
                <a href="index.jsp"  title="BrainStorming">
                    <img src="images/logo.png" alt="BrainStorming">
                </a>
                <span class="tag-line">Tomorrow is another day</span>
            </div>


            <!-- Start of Main Navigation -->
            <nav class="main-nav">
                <div class="menu-top-menu-container">
                    <ul id="menu-top-menu" class="clearfix">
                        <li><a href="index.jsp">首页</a></li>
                        <li><a href="home-categories-articles.jsp">Home 3</a></li>
                        <li><a href="articles-list.jsp">Articles List</a></li>
                        <li><a href="faq.jsp">FAQs</a></li>
                        <li><a href="#">Skins</a>
                            <ul class="sub-menu">
                                <li><a href="blue-skin.jsp">Blue Skin</a></li>
                                <li><a href="green-skin.jsp">Green Skin</a></li>
                                <li><a href="red-skin.jsp">Red Skin</a></li>
                                <li><a href="index.jsp">Default Skin</a></li>
                            </ul>
                        </li>
                        <li><a href="#">More</a>
                            <ul class="sub-menu">
                                <li><a href="full-width.jsp">Full Width</a></li>
                                <li><a href="elements.jsp">Elements</a></li>
                                <li><a href="page.jsp">Sample Page</a></li>
                            </ul>
                        </li>

                        <li class="current-menu-item"><a href="share-ideas.jsp">Share</a></li>
                        <%
                            if(username!=null){
                        %>
                        <li><a href="#">欢迎你，${username}</a>
                            <ul class="sub-menu">
                                <li><a href="login.jsp">切换用户</a></li>
                                <li><a href="regist.jsp">新用户注册</a></li>
                                <li><a href="logout.jsp">退出登录</a></li>
                            </ul>
                        </li>
                        <%
                        }else{
                        %>
                        <li><a href="login.jsp">未登录</a></li>
                        <%
                            }
                        %>
                    </ul>
                </div>
            </nav>
            <!-- End of Main Navigation -->

        </div>
    </header>
</div>
<!-- End of Header -->

<!-- Start of Page Container -->
<div class="page-container">
    <div class="container">
        <div class="row">

            <!-- start of page content -->
            <div class="span8 page-content">

                <article class="type-page hentry clearfix">
                    <h1 class="post-title">
                        <a href="#">Wow! you have one idea want to share?</a>
                    </h1>
                    <hr>
                    <p>不管是听起来多疯狂的灵感，或是日常生活中遇到的需求问题，千万不要扼杀你时而一闪而过的想法，如果你真的希望它变成真的，请写下来与大家分享，也许你认为的不可能有一天会变成可能。Tomorrow Is Another Day! Better Day!</p>
                </article>


                <form id="contact-form" class="row" action="ShareServlet" method="post">
                    <input type="hidden" name="username" value=${username}>
                    <div class="span2">
                        <label>Subject<span>*</span></label>
                    </div>
                    <div class="span6">
                        <input type="text" name="subject" id="reason" value="" class="required span6" title="* Please enter your subject">
                    </div>
                    <div class="span2">
                        <label>Categries</label>
                    </div>
                    <div class="span6">
                        <select name="categories">
                            <option value="日常生活类">日常生活类</option>
                            <option value="电子产品类">电子产品类</option>
                            <option value="手机应用类">手机应用软件类</option>
                            <option value="办公/学习类">办公/学习类</option>
                            <option value="其他" selected>其他</option>
                        </select>
                    </div>

                    <div class="span2">
                        <label>Your Description</label>
                    </div>
                    <div class="span6">
                        <textarea name="description" id="message" class="span6" rows="6"></textarea>
                    </div>

                    <div class="span6 offset2 bm30">
                        <input type="submit" name="submit" value="Share your idea" class="btn btn-inverse">
                        <img src="images/loading.gif" id="contact-loader" alt="Loading...">
                    </div>

                    <div class="span6 offset2 error-container"></div>
                    <div class="span8 offset2" id="message-sent"></div>

                </form>
                <%--信息提示--%>
                <font color="red" size="2">${msg}</font>
            </div>
            <!-- end of page content -->


            <!-- start of sidebar -->
            <aside class="span4 page-sidebar">

                <section class="widget">
                    <div class="support-widget">
                        <h3 class="title">Support</h3>
                        <p class="intro">Need more support? If you did not found an answer, contact us for further help.</p>
                    </div>
                </section>

                <section class="widget">
                    <h3 class="title">Latest Articles</h3>
                    <ul class="articles">
                        <%
                            IdeaDao ideaDao2= new IdeaDao();
                            List<IdeaDao> ideaDaos2= ideaDao2.readByTime();

                            Date date2 = new Date();
                            for(int i=0;i<4;i++){
                                date2 = ideaDaos2.get(i).getTime();
                                int year= date2.getYear()+1900;
                                int month=date2.getMonth()+1;
                                String MON=ideaDao2.changeMon(month);
                                int day = date2.getDate();
                        %>
                        <li class="article-entry standard">
                            <h4><a href="single.jsp?id=<%=ideaDaos2.get(i).getIid()%>"><%=ideaDaos2.get(i).getSubject()%></a></h4>
                            <span class="article-meta"><%=day%>&nbsp;<%=MON%>,&nbsp;<%=year%>&nbsp;in <a href="#" title="View all posts in Server &amp; Database"><%=ideaDaos2.get(i).getCategories()%></a></span>
                            <span class="like-count"><%=ideaDaos2.get(i).getLikes()%></span>
                        </li>
                        <%
                            }

                        %>
                    </ul>
                </section>


            </aside>
            <!-- end of sidebar -->
        </div>
    </div>
</div>
<!-- End of Page Container -->

<!-- Start of Footer -->
<footer id="footer-wrapper">
    <div id="footer" class="container">
        <div class="row">

            <div class="span3">
                <section class="widget">
                    <h3 class="title">How it works</h3>
                    <div class="textwidget">
                        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
                        <p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. </p>
                    </div>
                </section>
            </div>

            <div class="span3">
                <section class="widget"><h3 class="title">Categories</h3>
                    <ul>
                        <li><a href="#" title="Lorem ipsum dolor sit amet,">Advanced Techniques</a> </li>
                        <li><a href="#" title="Lorem ipsum dolor sit amet,">Designing in WordPress</a></li>
                        <li><a href="#" title="Lorem ipsum dolor sit amet,">Server &amp; Database</a></li>
                        <li><a href="#" title="Lorem ipsum dolor sit amet, ">Theme Development</a></li>
                        <li><a href="#" title="Lorem ipsum dolor sit amet,">Website Dev</a></li>
                        <li><a href="#" title="Lorem ipsum dolor sit amet,">WordPress for Beginners</a></li>
                        <li><a href="#" title="Lorem ipsum dolor sit amet, ">WordPress Plugins</a></li>
                    </ul>
                </section>
            </div>

            <div class="span3">
                <section class="widget">
                    <h3 class="title">Latest Tweets</h3>
                    <div id="twitter_update_list">
                        <ul>
                            <li>No Tweets loaded !</li>
                        </ul>
                    </div>
                    <script src="http://twitterjs.googlecode.com/svn/trunk/src/twitter.min.js" type="text/javascript"></script>
                    <script type="text/javascript" >
                        getTwitters("twitter_update_list", {
                            id: "960development",
                            count: 3,
                            enableLinks: true,
                            ignoreReplies: true,
                            clearContents: true,
                            template: "%text% <span>%time%</span>"
                        });
                    </script>
                </section>
            </div>

            <div class="span3">
                <section class="widget">
                    <h3 class="title">Flickr Photos</h3>
                    <div class="flickr-photos" id="basicuse">
                    </div>
                </section>
            </div>

        </div>
    </div>
    <!-- end of #footer -->

    <!-- Footer Bottom -->
    <div id="footer-bottom-wrapper">
        <div id="footer-bottom" class="container">
            <div class="row">
                <div class="span6">
                    <p class="copyright">
                        Copyright &copy; 2014.Company name All rights reserved.<a target="_blank" href="http://sc.chinaz.com/moban/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a>
                    </p>
                </div>
                <div class="span6">
                    <!-- Social Navigation -->
                    <ul class="social-nav clearfix">
                        <li class="linkedin"><a target="_blank" href="#"></a></li>
                        <li class="stumble"><a target="_blank" href="#"></a></li>
                        <li class="google"><a target="_blank" href="#"></a></li>
                        <li class="deviantart"><a target="_blank" href="#"></a></li>
                        <li class="flickr"><a target="_blank" href="#"></a></li>
                        <li class="skype"><a target="_blank" href="skype:#?call"></a></li>
                        <li class="rss"><a target="_blank" href="#"></a></li>
                        <li class="twitter"><a target="_blank" href="#"></a></li>
                        <li class="facebook"><a target="_blank" href="#"></a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- End of Footer Bottom -->

</footer>
<!-- End of Footer -->

<a href="#top" id="scroll-top"></a>

<!-- script -->
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='js/jquery.easing.1.34e44.js?ver=1.3'></script>
<script type='text/javascript' src='js/prettyphoto/jquery.prettyPhotoaeb9.js?ver=3.1.4'></script>
<script type='text/javascript' src='js/jquery.liveSearchd5f7.js?ver=2.0'></script>
<script type='text/javascript' src='js/jflickrfeed.js'></script>
<script type='text/javascript' src='js/jquery.formd471.js?ver=3.18'></script>
<script type='text/javascript' src='js/jquery.validate.minfc6b.js?ver=1.10.0'></script>
<script type='text/javascript' src='js/custom5152.js?ver=1.0'></script>

<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>
